/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.uoc.tdp.pac4.only5.manager;

import edu.uoc.tdp.pac4.only5.domain.*;
import edu.uoc.tdp.pac4.only5.exceptions.EespaisDatabaseException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;

/**
 *
 * @author Josep
 */
public interface UserManager extends Remote {

    public void addUser(User user) throws RemoteException;
    public void modifyUser(User user) throws RemoteException;
    public void deleteUser(String userId) throws RemoteException;
    public List<User> getUsers() throws RemoteException;
    public User getUserById(String userId) throws RemoteException, EespaisDatabaseException;
    public List<User> getUsersByName(String name) throws RemoteException;
    public void addRol(Rol rol) throws RemoteException;
    public void modifyRol(Rol rol) throws RemoteException;
    public void deleteRol(Integer roleId) throws RemoteException;
    public List<User> getUsersByRol(Integer roleId) throws RemoteException;
    public Rol getRol(Integer roleId) throws RemoteException, EespaisDatabaseException;
    public List<Rol> getRols() throws RemoteException;
    public List<User> getUsersByPostalCodes(String postalCode) throws RemoteException;
}
